<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
	<head>
		<html:base />
		<title>Ban User</title>
		<link href="login.css" rel="stylesheet" type="text/css">
	</head>
  
	<body>
		<logic:notPresent name="userid" scope="session">
			<logic:redirect forward="login_error"></logic:redirect>
		</logic:notPresent>
		<logic:notPresent name="admin" scope="session">
			<logic:redirect page="/not_admin.jsp"></logic:redirect>
		</logic:notPresent>
		<logic:notPresent name="users" scope="session">
			<logic:redirect page="/illegal_access.jsp"></logic:redirect>
		</logic:notPresent>
		<div class="container">
			<div class="header">
				<html:img page="/yssz.jpg"/>
				<div id="login">
					<html:link action="mainPre">main page</html:link>
					<logic:present name="search" scope="session">
						<html:link page="/form/search.jsp">back to search engine</html:link>
					</logic:present>
				</div>
			</div>
			<div class="content">
				<h1>Ban User</h1>
				<table width="800px" border="1" cellspacing="0" cellpadding="0">
					<tr>
						<th width="59">id</th>
						<th width="220">name</th>
						<th width="180">is banned</th>
						<th width="230">ban time</th>
						<th width="99">&nbsp;</th>
					</tr>
					<logic:iterate id="userList" name="users" scope="session">
						<tr>
							<bean:define id="userid" name="userList" property="userid"></bean:define>
							<td align="center"><bean:write name="userList" property="userid"/></td>
							<td align="center"><bean:write name="userList" property="name"/></td>
							<td align="center"><bean:write name="userList" property="ban"/></td>
							<td align="center"><bean:write name="userList" property="bantime"/></td>
							<td align="center"><a href="/se3/form/ban.jsp?banid=<%=userid %>">ban</a></td>
						</tr>
					</logic:iterate>
				</table>
			</div>
			<div class="footer">
				<p>copyright@yssz</p>
			</div>
		</div>
	</body>
</html:html>
